# $Id$
# Contributor: dorphell <dorphell@archlinux.org>
# Maintainer: Gaetan Bisson <bisson@archlinux.org>

pkgname=libao
pkgver=1.2.2
pkgrel=1
pkgdesc='Cross-platform audio output library and plugins'
url='http://xiph.org/ao/'
arch=('i686' 'x86_64')
license=('GPL')
depends=('alsa-lib')
makedepends=('libpulse' 'git')
backup=('etc/libao.conf')
#source=("http://downloads.xiph.org/releases/ao/${pkgname}-${pkgver}.tar.gz"
source=("git+https://git.xiph.org/libao.git#commit=3f4b02f046550aca54d7f11a5d9c56ac421f0b66"
        'libao.conf')
sha1sums=('SKIP'
          '603f5e6715e7e50e1c8e8c1935c45a897c46e9af')

conflicts=('libao-pulse')
provides=("libao-pulse=${pkgver}-${pkgrel}")
replaces=('libao-pulse')

build() {
#	cd "${srcdir}/${pkgname}-${pkgver}"
	cd "${srcdir}/${pkgname}"
	./autogen.sh

	./configure \
		--prefix=/usr \
		--enable-alsa-mmap \

	make
}

package() {
#	cd "${srcdir}/${pkgname}-${pkgver}"
	cd "${srcdir}/${pkgname}"

	make DESTDIR="${pkgdir}" install
	install -Dm644 "${srcdir}"/libao.conf "${pkgdir}"/etc/libao.conf
}
